/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cadi.aux;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;

/**
 *
 * @author ApoZuniga
 */
public class CounterEasy extends Window{
    private JLabel instruction;
    private JLabel imageInstruction;
    protected Coin coinOne;
    protected Coin coinTwo;
    protected Coin coinThree;
    protected Coin coinFour;
    protected Coin coinFive;
    protected JButton optionTotalOne;
    protected JButton optionTotalTwo;
    protected JButton optionTotalThree;
    protected ActionListener listenerGood;
    protected ActionListener listenerBad;
    protected int currentLevel;

    public CounterEasy() {
        super();
        instruction = new JLabel("¿Cuánto es el total que forman las siguientes monedas?");
        instruction.setFont(styleText);
        instruction.setBounds(100, -50, 600, 300);
        imageInstruction = new JLabel(new ImageIcon(getClass().getResource("/resources/globoCuentas.png")));
        imageInstruction.setBounds(140, 290, 200, 162);
        this.container.add(imageInstruction, JLayeredPane.PALETTE_LAYER); 
        this.container.add(instruction, JLayeredPane.PALETTE_LAYER);
        window.setVisible(true);
        
    }
    
    public void totalActionPerformed(ActionEvent evt, int answer) {
        if (answer == 1) {
            result = java.applet.Applet.newAudioClip(getClass().getResource("/resources/bien.wav"));
            result.play();
            JOptionPane.showMessageDialog(null, "¡Bien Hecho!", "¡Bien Hecho!", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource("/resources/right.png")));
        } else {
            result = java.applet.Applet.newAudioClip(getClass().getResource("/resources/mal.wav"));
            result.play();
            JOptionPane.showMessageDialog(null, "Intenta de nuevo", "Intenta de nuevo", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource("/resources/wrong.png")));
        }
    }
}